'''
Created on May 3, 2012

@author: peng
'''

def get_ex(x):
    try:
        if x == 0:
            raise NotImplementedError()
        return ''
    except Exception, e:
        print str(e)
    finally:
        print 'ok'


x = get_ex(1)
if x:
    print x
x = get_ex(0)
if x:
    print x
